* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(45deg, #2196f3, #e91e63);
}

.register-container {
    width: 100%;
    max-width: 500px;
    padding: 20px;
}

.register-box {
    background: rgba(255, 255, 255, 0.9);
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

h2 {
    text-align: center;
    color: #333;
    margin-bottom: 30px;
}

.message-box {
    padding: 12px;
    border-radius: 5px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    font-size: 14px;
}

.message-box.error {
    background-color: #ffebee;
    color: #c62828;
    border: 1px solid #ffcdd2;
}

.message-box.success {
    background-color: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
}

.message-box i {
    margin-right: 8px;
}

.input-group {
    position: relative;
    margin-bottom: 30px;
}

.input-group input {
    width: 100%;
    padding: 10px 0;
    font-size: 16px;
    color: #333;
    border: none;
    border-bottom: 2px solid #ddd;
    outline: none;
    background: transparent;
    transition: 0.3s;
}

.input-group label {
    position: absolute;
    top: 0;
    left: 0;
    padding: 10px 0;
    font-size: 16px;
    color: #666;
    pointer-events: none;
    transition: 0.3s ease-out;
}

.input-group .error-text {
    color: #c62828;
    font-size: 12px;
    position: absolute;
    bottom: -20px;
    left: 0;
    display: none;
}

.input-group input:focus,
.input-group input:valid {
    border-bottom-color: #2196f3;
}

.input-group input:focus ~ label,
.input-group input:valid ~ label {
    transform: translateY(-20px);
    font-size: 12px;
    color: #2196f3;
}

.input-group .toggle-password {
    position: absolute;
    right: 0;
    top: 10px;
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
}

.input-group .toggle-password:hover {
    color: #2196f3;
}

.password-strength {
    position: absolute;
    bottom: -20px;
    left: 0;
    width: 100%;
    height: 4px;
    background: #ddd;
    border-radius: 2px;
    overflow: hidden;
}

.password-strength .strength-bar {
    height: 100%;
    width: 0;
    transition: 0.3s;
    border-radius: 2px;
}

.password-strength .strength-text {
    position: absolute;
    right: 0;
    top: -18px;
    font-size: 12px;
    color: #666;
}

.strength-weak .strength-bar {
    width: 33.33%;
    background: #ff5252;
}

.strength-medium .strength-bar {
    width: 66.66%;
    background: #ffd740;
}

.strength-strong .strength-bar {
    width: 100%;
    background: #00c853;
}

.terms {
    margin-bottom: 20px;
    font-size: 14px;
    color: #666;
}

.terms label {
    display: flex;
    align-items: center;
    gap: 8px;
}

.terms input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.terms a {
    color: #2196f3;
    text-decoration: none;
}

.terms a:hover {
    text-decoration: underline;
}

.register-btn {
    width: 100%;
    padding: 12px;
    background: #2196f3;
    color: #fff;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: 0.3s;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.register-btn:hover {
    background: #1976d2;
}

.register-btn:disabled {
    background: #90caf9;
    cursor: not-allowed;
}

.register-btn .spinner {
    width: 20px;
    height: 20px;
    border: 3px solid #ffffff;
    border-top: 3px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    position: absolute;
    right: 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.login-link {
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
    color: #666;
}

.login-link a {
    color: #2196f3;
    text-decoration: none;
    font-weight: 500;
}

.login-link a:hover {
    text-decoration: underline;
}

@media (max-width: 480px) {
    .register-container {
        padding: 10px;
    }
    
    .register-box {
        padding: 20px;
    }
    
    .terms {
        font-size: 12px;
    }
}
